package com.gupao.javavip.rpc.client;

import com.gupao.javavip.rpc.framework.client.RPCClientConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages = "com.gupao.javavip.rpc.**")
public class SpringConfig {

    @Bean
    public RPCClientConfig getRPCConfig() {
        RPCClientConfig config = new RPCClientConfig();
        config.setServicePackage("com.gupao.javavip.rpc.api");
        config.setRegistryAdd("192.168.56.101:2181");
        config.setServiceId("UserServiceServer");
        return config;
    }
}
